package com.engineering.elink.common;

/**
 * 会员级别
 * @author hxjxiaojun
 *@time 2017年3月1日
 */
public enum MenberEnum {

	REGULAR_MEMBERS("普通会员", 1), 
	REGISTER_TRAINEE_MEMBER("实名注册会员-见习生",2),
	REGISTER_ASSISTANT_MEMBER("实名注册会员-助理工程师",3),
	REGISTER_ENGINERR_MEMBER("实名注册会员-工程师",4),
	REGISTER_SENIOR_ENGINERR_MEMBER("实名注册会员-高级工程师",5),
	REGISTER_PROFESSOR_MEMBER("实名注册会员-教授级高级工程师",6),
	REGISTER_MASTER_MEMBER("实名注册会员-工程大师",7),
	ADVISER_MEMBER("实名专家/顾问",8);
	
	// 成员变量
	private String name;
	private int index;

	// 构造方法
	private MenberEnum(String name, int index) {
		this.name = name;
		this.index = index;
	}

	// 普通方法
	public static String getName(int index) {
		for (MenberEnum c : MenberEnum.values()) {
			if (c.getIndex() == index) {
				return c.name;
			}
		}
		return null;
	}

	// get set 方法
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}
	
	public String toString () {
		
		return "index=" + this.index + "&&name=" + this.name;
	}
}
